package com.ria09.zebra
{
	/**
	 * Class Course
	 */
	import mx.collections.ArrayCollection;
	
	[Bindable]
	public class Course extends Object
	{
		private var _id:Number;
		private var _name:String;
		private var _code:String;
		private var _start:Date;
		private var _end:Date;
		private var _groups:ArrayCollection;
		private var _instructor:Employee;
		
		/**
	 	 * Course
	 	 * @author Charlotte Wasston
	 	 */
		public function Course()
		{
		}

		public function get id():Number {
			return this._id;
		}
		public function set id(value:Number):void {
			this._id = value;
		}

		public function get name():String {
			return this._name;
		}
		public function set name(value:String):void {
			this._name = value;
		}

		public function get code():String {
			return this._code;
		}
		public function set code(value:String):void {
			this._code = value;
		}

		public function get start():Date {
			return this._start;
		}
		public function set start(value:Date):void {
			this._start = value;
		}
		
		public function get end():Date {
			return this._end;
		}
		public function set end(value:Date):void {
			this._end = value;
		}
		
		public function retrieveObject():Object {
			var obj:Object = new Object();
			obj.id = this._id;
			obj.name = this._name;
			obj.code = this._code;
			obj.start = this._start;
			obj.end = this._end;
			
			return obj;
		}
		
		public function setObject(obj:Object):void {
			this._id = obj.id;
			this._name = obj.name;
			this._code = obj.code;
//			this._start = obj.start;
//			this._end = obj.end;
		}


//fixa logiken för vad du vill hämta
/* 		public function get groups():ArrayCollection {
			return this._groups;
		}
 */
 //fixa logiken för vad du vill sätta

/* 		public function set groups(value:Group):void {
			this._groups.addItem(group);
		}
 */		
//fixa logiken för vad du vill hämta

/* 		public function get instructor():Employee {
			return this._instructor;
		}
 */
	}
}